<template>
  <div class="main" ref='mainDiv'>
    <div ref="chart1" class="template1ConImg"></div>
  </div>

</template>

<script>
  export default {
    name: 'number1',
    components: {

    },
    data() {
      return {

      }
    },
    mounted() {
      if (this.$route.path == "/cglmap") {
        this.$refs.mainDiv.style.transform = 'scale(1)'

      }
      this.getEchartData()
    },
    methods: {
      getEchartData() {
        const chart1 = this.$refs.chart1;
        if (chart1) {
          const myChart = this.$echarts.init(chart1)
          var that = this;
          that.$myHttp.post("getTongGuanSHenBaoInfo")
            .then(function(data0) {
              if (data0.status == "200") {

              } else {
                alert("数据请求错误")
              }

            })
            .catch(function(error) {
              alert(error)
            })
          const option = {};
          myChart.setOption(option)
          window.addEventListener("resize", function() {
            myChart.resize()
          })
        }
      }
    }
  }
</script>

<style>
  .main {
    height: 100vh;
    width: 100vw;
    background: #012d60;
    min-width: 19.2rem;
    box-sizing: border-box;
    transform-origin: 0 0;
    transform: scale(0.49);
  }
</style>
